<template>
  <div class="order-set-pay">
    <div class="pay-title">支付方式</div>
    <van-radio-group v-model="radio">
      <van-cell-group>
        <van-cell
          class="vip-pay"
          title="会员卡支付"
          clickable
          @click="radio = '1'"
        >
          <van-icon class="vip-icon" name="gold-coin" />
          <div style="padding-right: 4vw">余额不足</div>
          <div class="vip-card">
            <div class="card">
              <div>300.00元</div>
              <div>赠单品免费券*1</div>
            </div>
            <div class="card">
              <div>300.00元</div>
              <div>赠单品免费券*1</div>
            </div>
            <div class="card">
              <div>300.00元</div>
              <div>赠单品免费券*1</div>
            </div>
          </div>
          <template #right-icon>
            <van-radio checked-color="#a7d500" name="1" />
          </template>
        </van-cell>
        <van-cell
          class="wechat-pay"
          title="微信支付"
          clickable
          @click="radio = '2'"
        >
          <van-icon class="wechat-icon" name="wechat-pay" />
          <template #right-icon>
            <van-radio checked-color="#a7d500" name="2" />
          </template>
        </van-cell>
      </van-cell-group>
    </van-radio-group>
  </div>
</template>

<script>
export default {
  data() {
    return {
      radio: "2",
    };
  },
};
</script>

<style scoped>
.order-set-pay {
  width: 96%;
  margin: 2vw auto;
  background-color: white;
  padding: 0 3vw;
  box-sizing: border-box;
  border-radius: 2vw;
  font-size: 4vw;
}
.order-set-pay .pay-title {
  padding: 3vw 0;
}
.order-set-pay .vip-pay {
  padding: 0 0 25vw 0;
  position: relative;
}
.order-set-pay .vip-pay .vip-card::-webkit-scrollbar {
  width: 0 !important;
}
.order-set-pay .vip-pay .vip-card {
  width: 258%;
  height: 25vw;
  position: absolute;
  top: 8vw;
  left: -45vw;
  display: flex;
  overflow: auto;
}
.order-set-pay .vip-pay .vip-card .card:nth-child(1) {
  margin-left: 1vw;
  overflow: hidden;
  position: relative;
}
.order-set-pay .vip-pay .vip-card .card:nth-child(1)::before {
  content: "立赠1杯";
  display: block;
  color: #222;
  line-height: 5vw;
  font-size: 12px;
  position: absolute;
  background-color: #fbe946;
  top: -2px;
  left: -5px;
  border-radius: 1vw;
  transform: scale(0.8);
}
.order-set-pay .vip-pay .vip-card .card {
  color: #222;
  width: 35vw;
  box-sizing: border-box;
  padding: 4vw;
  border: 1px solid #e2e5e7;
  border-radius: 1vw;
  margin: 2vw 2vw 0 0;
  flex-shrink: 0;
}
.order-set-pay .vip-pay .vip-card .card > div {
  text-align: center;
  margin: 0;
  padding: 0;
  font-size: 3vw;
  line-height: 5vw;
}
.order-set-pay .vip-pay ::v-deep .van-radio__icon {
  margin-right: 5vw;
}
.order-set-pay .wechat-pay {
  padding-top: 3vw;
  border-top: 1px solid gray;
}
.order-set-pay .wechat-pay .van-cell__value,
.order-set-pay .vip-pay .van-cell__value {
  overflow: visible;
}
.order-set-pay .wechat-pay .van-cell__title:nth-child(1) {
  margin-left: 5vw;
}
.order-set-pay .vip-pay .van-cell__title:nth-child(1) {
  margin-left: 10vw;
}
.order-set-pay .wechat-pay .wechat-icon,
.order-set-pay .vip-pay .vip-icon {
  position: absolute;
  top: 1px;
  left: -43vw;
  font-size: 6vw;
}
.order-set-pay .vip-pay .vip-icon {
  left: -42vw;
}
.order-set-pay .wechat-pay .wechat-icon {
  color: #6bcc03;
}
.order-set-pay .vip-pay .vip-icon {
  color: #a0a4a7;
}
</style>